package com.hex.ds.hdtp.core.app.common.page;

import com.hex.bigdata.hbda.base.Page;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2020/2/17.
 */
public class PageData {


    private Object content;

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    private long total;

    public PageData(Object content, Page page) {
        this.content = content;
        this.total = page.getTotal();
    }

    public PageData(Object content, long total) {
        this.content = content;
        this.total = total;
    }

    public Map<String,Object> toMap(){
        Map<String,Object> map = new HashMap<String,Object>();
        map.put("content",this.content);
        map.put("total",this.getTotal());
        return map;
    }
}
